USE [Smart]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_MealLog_Meal]') AND parent_object_id = OBJECT_ID(N'[dbo].[MealLog]'))
ALTER TABLE [dbo].[MealLog] DROP CONSTRAINT [FK_MealLog_Meal]
GO
USE [Smart]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_MealLog_User]') AND parent_object_id = OBJECT_ID(N'[dbo].[MealLog]'))
ALTER TABLE [dbo].[MealLog] DROP CONSTRAINT [FK_MealLog_Meal]
GO

USE [Smart]
GO

/****** Object:  Table [dbo].[MealLog]    Script Date: 06/01/2012 22:16:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MealLog]') AND type in (N'U'))
DROP TABLE [dbo].[MealLog]
GO


IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Meal_MealCategory]') AND parent_object_id = OBJECT_ID(N'[dbo].[Meal]'))
ALTER TABLE [dbo].[Meal] DROP CONSTRAINT [FK_Meal_MealCategory]
GO

USE [Smart]
GO

/****** Object:  Table [dbo].[Meal]    Script Date: 06/01/2012 20:54:32 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Meal]') AND type in (N'U'))
DROP TABLE [dbo].[Meal]
GO

USE [Smart]
GO

/****** Object:  Table [dbo].[MealCategory]    Script Date: 06/01/2012 20:54:49 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MealCategory]') AND type in (N'U'))
DROP TABLE [dbo].[MealCategory]
GO


